package io;

import java.io.FileInputStream;
import java.io.FileOutputStream;

public class CopyDemo3 {
    public static void main(String[] args) throws Exception {
        FileInputStream fis = new FileInputStream("guilin.jpg");
        FileOutputStream fos = new FileOutputStream("guiling.jpg");

        byte[] data  = new byte[1024*10];

        int len ;
        long start = System.currentTimeMillis();
        while ((len = fis.read(data))!=-1){
            fos.write(data,0,len);
        }
        System.out.println("复制完成");
        fis.close();
        fos.close();
        long end = System.currentTimeMillis();
    }
}
